<template>
  <div class="help_detail">
    <van-nav-bar :title="title" left-arrow @click-left="onClickLeft" />
    <div class="conetent">
      <div v-html="data.content"></div>
    </div>

    <!-- {{ data.conyent }} -->
  </div>
</template>

<script setup>
import { ref, reactive } from "@vue/reactivity";
import { helpContent } from "@/api/user";
import { onMounted } from "vue";
import { useRouter, useRoute } from "vue-router";
import { Toast } from "vant";
const router = useRouter();
const route = useRoute();
import { useI18n } from "vue-i18n";
const { t } = useI18n();
let title = ref("");
const data = reactive({
  content: "",
});
onMounted(async () => {
  title.value = route.query.name;
  console.log(route.query);
  let res = await helpContent(route.query.id).catch((err) => {
    Toast(err);
  });
  console.log(res);
  Object.assign(data, res.data);
});
function onClickLeft() {
  history.back();
}
</script>

<style lang="less" scoped>
.help_detail {
  .van-nav-bar__title.van-ellipsis {
    font-size: 18px;
  }
  .conetent {
    padding: 13px;
    white-space: pre-wrap;
  }
  :deep(.van-cell:after) {
    border-bottom: 1px solid #e6e6e6;
  }
}
</style>